package com.springboot.service.impl;

import com.springboot.mapper.AssistantListFormMapper;
import com.springboot.mapper.UserLoginFormMapper;
import com.springboot.model.AssistantListFormKey;
import com.springboot.model.UserLoginForm;
import com.springboot.service.DoctorSetAssistantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 医生设置新的助理
 */
@Service
public class DoctorSetAssistantServiceImpl implements DoctorSetAssistantService {
    @Autowired
    private UserLoginFormMapper userLoginFormMapper;
    @Autowired
    private AssistantListFormMapper assistantListFormMapper;

    //通过手机号码查找用户
    @Override
    public UserLoginForm findUserByTel(String userTel)
    {
        UserLoginForm userLoginForm=userLoginFormMapper.selectByTel(userTel);
        return userLoginForm;
    }

    //插入数据到助理列表中
    @Override
    public int insertIntoAssistantList(AssistantListFormKey assistantListFormKey)
    {
        return assistantListFormMapper.insert(assistantListFormKey);
    }
}
